package design.builder;
import java.util.*;

public class BookBuilder extends Builder{ //建造者模式具体实现
	String t;
	@Override
	public void WriteBook(Scanner scan) {
		System.out.print("请输入图书号:");
		t = scan.nextLine();
		b.setBid(t);
		
		System.out.print("请输入图书名:");
		t = scan.nextLine();
		b.setBname(t);
		
		System.out.print("请输入作者:");
		t = scan.nextLine();
		b.setBauthor(t);
		
		System.out.print("请输入书类型:");
		t = scan.nextLine();
		b.setBtype(t);
		
		System.out.print("请输入书价格:");
		t = scan.nextLine();
		b.setBprice(Integer.parseInt(t));
		
		System.out.print("请输入书数量:");
		t = scan.nextLine();
		b.setBamount(Integer.parseInt(t));
		
		System.out.print("请输入出版时间");
		t = scan.nextLine();
		b.setBpubdate(t);
	}
}
